//
//  HOTCommPullDonwView.m
//  Genpara
//
//  Created by AndyChang.zhang on 14-9-5.
//  Copyright (c) 2014年 zhangchh. All rights reserved.
//

#import "HOTCommPullDonwView.h"

@implementation HOTCommPullDonwView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self updateView];
    }
    return self;
}

-(void)awakeFromNib {
    
    [super awakeFromNib];
    [self updateView];
}

-(void)updateView {
    
    [self setPullEdgesForBounds:CGRectMake(10, 0, -20, 0)];
    //[self setTitleEdgeInsets:UIEdgeInsetsMake(0, -100, 0, 0)];
    [self setTitleLabFrame:CGRectMake(14, 0, 215, self.frame.size.height)];
    [self setTitleFont:ZZZ_fontWithName(kHOT_FONT_ROUNDED_X, 16)];
    self.backgroundColor = [UIColor clearColor];
    UIImage *bgImage = [UIImage imageNamed:@"pulldown_open"];
    bgImage = [bgImage resizableImageWithCapInsets:UIEdgeInsetsMake(20, 20, 20, 20)];
    UIImageView *openBgView = [[UIImageView alloc] initWithImage:bgImage];
    [self setOpenListBackground:openBgView];
    
    [self setBackground:[UIImage imageNamed:@"pulldown_box"]];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
